import request from '@/utils/request'

// 查询设备数据传输列表
export function listTransaction(query) {
  return request({
    url: '/business/transaction/list',
    method: 'get',
    params: query
  })
}

// 查询设备数据传输详细
export function getTransaction(id) {
  return request({
    url: '/business/transaction/' + id,
    method: 'get'
  })
}

// 新增设备数据传输

export function addTransaction(data) {
  return request({
    url: '/business/transaction',
    method: 'post',
    data: data
  })
}

// 修改设备数据传输

export function updateTransaction(data) {
  return request({
    url: '/business/transaction',
    method: 'put',
    data: data
  })
}

// 删除设备数据传输

export function delTransaction(id) {
  return request({
    url: '/business/transaction/' + id,
    method: 'delete'
  })
}

// 获取设备趋势图数据
export function getTrendList(params) {
  return request({
    url: '/business/transaction/trend',
    method: 'get',
    params: params
  })
}
